import request from "../utils/request";

//分页条件查询
export const queryUserAll = (page,pageSize,name,userCode,role) => {return request.get(`/user?page=${page}&pageSize=${pageSize}&name=${name}&userCode=${userCode}&role=${role}`)};

//添加用户
export const addUser = (data) => {return request.post("/user",data)};

//根据id回显数据
export const queryUserById = (id) => {return request.get(`/user/${id}`)};

//修改用户
export const updateUser = (data) => {return request.put("/user",data)};

//删除用户
export const deleteUser = (id) => {return request.delete(`/user/${id}`)};

//查询所有用户
export const getAllUser = () => {return request.get("/user/all")};